<?php
/**
 * Created by PhpStorm.
 * User: 王峥宇
 * Date: 2019-04-29
 * Time: 18:36
 */

namespace app\admin\controller;

use app\admin\model\Shop as ShopModel;

class Shop extends Base
{
    public function index(){
        $user = ShopModel::getShopUser();
        $page = $user->render();
        $this->assign('user',$user);
        $this->assign('page', $page);
        return $this->fetch();
    }

    public function shopindent(){
        $indentNew = ShopModel::getShopIndent();
        $page = $indentNew->render();
        $this->assign('indent', $indentNew);
        $this->assign('page', $page);
        return $this->fetch();
    }

    public function insert(){
        if(request()->isAjax()) {
            $insert = ShopModel::getInsertUser();
            return $insert;
        }
        return $this->fetch();
    }

    //用户锁定状态的改变
    public function suoding()
    {
        $rs = ShopModel::suoding();
        return $rs;
    }
}